let str = "hello";
console.log(str);
//1.for遍历
for (let i = 0; i < str.length; i++) {
    const element = str[i];
    console.log(i,str[i]);      //i 索引 数值类型
}

//2.数组->for->for in
let arr = [1,2,3];
for (let i in arr) {
    console.log(i,arr[i]);      //i 索引 字符串类型
}

//3.for... of
for (const i of str) {
    console.log(i);         //数据
}

//4.解构
let[a,b,c,d,e] = str;
console.log(a,b,c,d,e);